cmake_minimum_required(VERSION 3.13.4)

SET(CMAKE_EXE_LINKER_FLAGS " -no-pie")

message(${CMAKE_BINARY_DIR})

add_executable(test test.cpp)

# add_custom_command(
#     OUTPUT ${CMAKE_BINARY_DIR}/src/test.kt
#     DEPENDS ./test.kt
#     COMMAND ${CMAKE_COMMAND} -E copy
#     ./test.kt
#     ${CMAKE_BINARY_DIR}/src/test.kt
# )

target_link_libraries(test  ${CMAKE_BINARY_DIR}/src/a.o c rt dl pthread z m)